package com.calvin.tingapp.actions;

import android.view.View;
import android.widget.TextView;
import com.calvin.android.EventDispatch.CListen;
import com.calvin.android.annotation.ViewInject;
import com.calvin.android.notification.NotificationCenter;
import com.calvin.android.utils.CUtils;
import com.calvin.tingapp.R;
import com.calvin.tingapp.config.NTConfig;

public class SettingAction {

	@ViewInject(isTag = true, tag = "nav_left_button")
	public void onNavClick(View view) {
		NotificationCenter.shared().postNotice(NTConfig.NT_NAV_BACK);
	}

	@ViewInject(isTag = true, tag = "nav_title", listen = CListen.INIT)
	public void onInit(View view) {
		if ("nav_title".equals(view.getTag())) {
			CUtils.cast(view, TextView.class).setText(R.string.s_setting_title);
		}
	}
}
